# Group Invoices
Data related to an invoice for the event.

| Parameter | Description | Type | Required |
|:----------|-------------|------|----------|
| `status`  | Status of the event order | string | - |
| `identifier` | Unique ID for the invoice | string | - |
| `paypal-token` | Paypal Token for the event organizer | string | - |
| `transaction-id` | ID for Transaction | string | - |
| `brand` | Brand for event invoice | string | - |
| `created-at` | Time of creation of order | ISO 8601 (tz-aware) | - |
| `payment-mode` | Payment Mode | string | - |
| `stripe-token` | Stripe Token for the event organizer | string | - |
| `last4` | - | string | - |
| `exp-month` | Expiring Month | integer | - |
| `exp-year` | Expiring Year  | integer | - |
| `amount` | Amount of the order | float | - |
| `completed-at` | Completion of Invoice Order | ISO 8601 (tz-aware) | - |
| `paid-via` | Payment procedure | string | - |

## Event Invoices [/v1/event-invoices{?page%5bsize%5d,page%5bnumber%5d,sort,filter}]
+ Parameters
    + page%5bsize%5d (optional, integer, `10`) - Maximum number of resources in a single paginated response.
    + page%5bnumber%5d (optional, integer, `2`) - Page number to fetched for the paginated response.
    + sort (optional, string, `created-at`) - Sort the resources according to the given attribute in ascending order. Append '-' to sort in descending order.
    + filter (optional, string, `[]`) - Filter according to the flask-rest-jsonapi filtering system. Please refer: http://flask-rest-jsonapi.readthedocs.io/en/latest/filtering.html for more.


### Get Event Invoices [GET]
Get a list of event invoices.
+ Request

    + Headers

            Accept: application/vnd.api+json

            Authorization: JWT <Auth Key>

+ Response 200 (application/vnd.api+json)

        {
          "meta": {
            "count": 1
          },
          "data": [
            {
              "relationships": {
                "event": {
                  "links": {
                    "self": "/v1/event-invoices/1/relationships/event",
                    "related": "/v1/event-invoices/1/event"
                  }
                },
                "user": {
                  "links": {
                    "self": "/v1/event-invoices/1/relationships/user",
                    "related": "/v1/event-invoices/1/user"
                  }
                }
              },
              "attributes": {
                "status": "pending",
                "identifier": "3fe1aa02-34dd-41ea-a0a9-f7a0259b90b5",
                "paypal-token": null,
                "exp-year": null,
                "transaction-id": null,
                "brand": null,
                "created-at": "2017-06-08T11:24:57.344803+00:00",
                "payment-mode": null,
                "stripe-token": null,
                "last4": null,
                "exp-month": null,
                "amount": 100.0,
                "completed-at": null,
                "paid-via": null
              },
              "type": "event-invoice",
              "id": "1",
              "links": {
                "self": "/v1/event-invoices/1"
              }
            }
          ],
          "jsonapi": {
            "version": "1.0"
          },
          "links": {
            "self": "/v1/event-invoices"
          }
        }


## Event Invoices Details [/v1/event-invoices/{event_invoice_id}]
+ Parameters
    + event_invoice_id: 1 (integer) - ID of the event invoice in the form of an integer

### Event Invoices Details [GET]
Get a single event invoice.

+ Request

    + Headers

            Accept: application/vnd.api+json

            Authorization: JWT <Auth Key>

+ Response 200 (application/vnd.api+json)

        {
            "data": {
                "relationships": {
                    "event": {
                        "links": {
                            "self": "/v1/event-invoices/5/relationships/event",
                            "related": "/v1/event-invoices/5/event"
                        }
                    },
                    "user": {
                        "links": {
                            "self": "/v1/event-invoices/5/relationships/user",
                            "related": "/v1/event-invoices/5/user"
                        }
                    }
                },
                "attributes": {
                    "status": "pending",
                    "identifier": "b88639c9-5a41-45ea-884d-977876baa08f",
                    "paypal-token": "1234",
                    "invoice-pdf-url": null,
                    "transaction-id": "ae43awer",
                    "brand": "brand",
                    "created-at": "2017-06-28T08:10:14.968538+00:00",
                    "payment-mode": "mode",
                    "stripe-token": "fssfda432",
                    "last4": "5445",
                    "exp-month": 10,
                    "amount": 500,
                    "completed-at": null,
                    "exp-year": 2100,
                    "paid-via": "stripe"
                },
                "type": "event-invoice",
                "id": "5",
                "links": {
                    "self": "/v1/event-invoices/5"
                }
            },
            "jsonapi": {
                "version": "1.0"
            },
            "links": {
                "self": "/v1/event-invoices/5"
            }
        }


## Event Invoice List of an Event [/v1/events/{event_identifier}/event-invoices{?page%5bsize%5d,page%5bnumber%5d,sort,filter}]
+ Parameters
    + event_identifier: 1 (string) - identifier or event id of the event. (b8324ae2 is an example of identifier)
    + page%5bsize%5d (optional, integer, `10`) - Maximum number of resources in a single paginated response.
    + page%5bnumber%5d (optional, integer, `1`) - Page number to fetched for the paginated response.
    + sort (optional, string, `status`) - Sort the resources according to the given attribute in ascending order. Append '-' to sort in descending order.
    + filter (optional, string, `[]`) - Filter according to the flask-rest-jsonapi filtering system. Please refer: http://flask-rest-jsonapi.readthedocs.io/en/latest/filtering.html for more.

### List Event Invoices of an Event [GET]
Get a single event invoice.

+ Request

    + Headers

            Accept: application/vnd.api+json

            Authorization: JWT <Auth Key>

+ Response 200 (application/vnd.api+json)


        {
            "meta": {
                "count": 1
            },
            "data": [
                {
                    "relationships": {
                        "event": {
                            "links": {
                                "self": "/v1/event-invoices/1/relationships/event",
                                "related": "/v1/event-invoices/1/event"
                            }
                        },
                        "user": {
                            "links": {
                                "self": "/v1/event-invoices/1/relationships/user",
                                "related": "/v1/event-invoices/1/user"
                            }
                        }
                    },
                    "attributes": {
                        "status": "pending",
                        "identifier": "1881f5f8-2936-4796-b51e-b9a97a54ba9a",
                        "paypal-token": "1234",
                        "invoice-pdf-url": null,
                        "transaction-id": "ae43awer",
                        "brand": "brand",
                        "created-at": "2017-08-06T23:45:30.564344+00:00",
                        "payment-mode": "mode",
                        "stripe-token": "fssfda432",
                        "last4": "5445",
                        "exp-month": 10,
                        "amount": 500,
                        "completed-at": null,
                        "exp-year": 2100,
                        "paid-via": "stripe"
                    },
                    "type": "event-invoice",
                    "id": "1",
                    "links": {
                        "self": "/v1/event-invoices/1"
                    }
                }
            ],
            "jsonapi": {
                "version": "1.0"
            },
            "links": {
                "self": "/v1/events/1/event-invoices"
            }
        }


## Event Invoice List of a User [/v1/users/{user_id}/event-invoices{?page%5bsize%5d,page%5bnumber%5d,sort,filter}]
+ Parameters
    + user_id: 2 (integer) - ID of the user in the form of an integer
    + page%5bsize%5d (optional, integer, `10`) - Maximum number of resources in a single paginated response.
    + page%5bnumber%5d (optional, integer, `1`) - Page number to fetched for the paginated response.
    + sort (optional, string, `status`) - Sort the resources according to the given attribute in ascending order. Append '-' to sort in descending order.
    + filter (optional, string, `[]`) - Filter according to the flask-rest-jsonapi filtering system. Please refer: http://flask-rest-jsonapi.readthedocs.io/en/latest/filtering.html for more.


### List Event Invoices of a User [GET]
Get a single event invoice.

+ Request

    + Headers

            Accept: application/vnd.api+json

            Authorization: JWT <Auth Key>

+ Response 200 (application/vnd.api+json)


        {
            "meta": {
                "count": 1
            },
            "data": [
                {
                    "relationships": {
                        "event": {
                            "links": {
                                "self": "/v1/event-invoices/1/relationships/event",
                                "related": "/v1/event-invoices/1/event"
                            }
                        },
                        "user": {
                            "links": {
                                "self": "/v1/event-invoices/1/relationships/user",
                                "related": "/v1/event-invoices/1/user"
                            }
                        }
                    },
                    "attributes": {
                        "status": "pending",
                        "identifier": "1881f5f8-2936-4796-b51e-b9a97a54ba9a",
                        "paypal-token": "1234",
                        "invoice-pdf-url": null,
                        "transaction-id": "ae43awer",
                        "brand": "brand",
                        "created-at": "2017-08-06T23:45:30.564344+00:00",
                        "payment-mode": "mode",
                        "stripe-token": "fssfda432",
                        "last4": "5445",
                        "exp-month": 10,
                        "amount": 500,
                        "completed-at": null,
                        "exp-year": 2100,
                        "paid-via": "stripe"
                    },
                    "type": "event-invoice",
                    "id": "1",
                    "links": {
                        "self": "/v1/event-invoices/1"
                    }
                }
            ],
            "jsonapi": {
                "version": "1.0"
            },
            "links": {
                "self": "/v1/events/1/event-invoices"
            }
        }
